package com.lst.api.controller;

import com.lst.api.service.IAddressService;
import com.lst.api.vo.AddressVo;
import com.lst.tools.custom.vo.JsonResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 地址信息控制层
 *
 * @author Frank
 * @date 2019-12-30 10:31:37
 * @version: V1.0
 */
@Api(tags = "地址信息控制层")
@RestController
@RequestMapping(value = "/address")
public class AddressController {

    @Autowired
    private IAddressService addressService;

    @ApiOperation(value = "获取全部地址信息")
    @GetMapping(value = "/listAll")
    public JsonResponse<List<AddressVo>> listAll() {
        List<AddressVo> responses = addressService.listAll();
        return JsonResponse.success(responses);

    }
}